🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / repository / src / commonMain / kotlin / org / meshtastic / core / repository / MqttManager.kt
Displaying Raw • Download
core/repository/src/commonMain/kotlin/org/meshtastic/core/repository/MqttManager.kt renovate/net.java.dev.jna-jna-5.x (5a8f4966) Text, 2.05 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.repository
Tff7b72import T7ee787kotlinx.coroutines.flow.StateFlow
Tff7b72import T7ee787org.meshtastic.core.model.MqttConnectionState
Tff7b72import T7ee787org.meshtastic.core.model.MqttProbeStatus
Tff7b72import T7ee787org.meshtastic.proto.MqttClientProxyMessage
T8b949e/** Interface for managing MQTT proxy communication. */
Tff7b72interface T56d364MqttManager Tb4b4b4{
T8b949e/** Observable MQTT proxy connection state for UI consumption. */
Tff7b72val Te6edf3mqttConnectionStateTb4b4b4: Te6edf3StateFlowTff7b72<Te6edf3MqttConnectionStateTff7b72>
T8b949e/** Starts the MQTT proxy with the given settings. */
Tff7b72fun Td2a8ffstartProxyTb4b4b4(Te6edf3enabledTb4b4b4: Tffa657BooleanTb4b4b4, Te6edf3proxyToClientEnabledTb4b4b4: Tffa657BooleanTb4b4b4)
T8b949e/** Stops the MQTT manager. */
Tff7b72fun Td2a8ffstopTb4b4b4(Tb4b4b4)
T8b949e/** Handles an MQTT proxy message from the radio. */
Tff7b72fun Td2a8ffhandleMqttProxyMessageTb4b4b4(Te6edf3messageTb4b4b4: Te6edf3MqttClientProxyMessageTb4b4b4)
T8b949e/**
* Probe an MQTT broker to verify connectivity and credentials without joining the proxy lifecycle. Intended for UI
* "Test Connection" affordances.
*
* @param address Raw broker address as the user would type it (host, host:port, or full URL).
* @param tlsEnabled `true` to upgrade bare addresses to `wss://` (ignored when [address] already has a scheme).
* @param username Optional MQTT username.
* @param password Optional MQTT password.
*/
Tff7b72suspend Tff7b72fun Td2a8ffprobeTb4b4b4(Te6edf3addressTb4b4b4: Tffa657StringTb4b4b4, Te6edf3tlsEnabledTb4b4b4: Tffa657BooleanTb4b4b4, Te6edf3usernameTb4b4b4: Tffa657String?Tb4b4b4, Te6edf3passwordTb4b4b4: Tffa657String?Tb4b4b4)Tb4b4b4: Te6edf3MqttProbeStatus
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.05s